<template>
    <div>
        <h2>学生管理</h2>
        <Update @show="show"></Update>
        <List :students="students"></List>
    </div>
</template>

<script setup>
import { onMounted,ref } from "vue";
import {find} from '../services/student';
import List from "../components/student/List.vue";
import Update from "../components/student/Update.vue";

const students = ref([]);

onMounted(() => {
  show();
})
async function show(params) {
  
    let res = await find(params);

    students.value = res.rows;
}
</script>

<style>
</style>